package com.qf.springcloud.item.mq;

import org.springframework.cloud.stream.annotation.StreamListener;
import org.springframework.stereotype.Component;

@Component
public class MyStreamListener {

    @StreamListener("zheshiwomendemubiaojiaohuanji")//这里面设置的是要监听的交换,会自动创建队列来监听
    public void onMessage(String msg) {
        System.err.println("收到的消息是========>:" + msg);
    }
}
